from c_cxcore cimport *

cdef extern from "cv.h":

    #------ Image Processing Function Prototypes ------#
    
    void cvCopyMakeBorder(CvArr* src, CvArr* dst, CvPoint offset,
                          int bordertype, CvScalar value) nogil
    
    void cvSmooth(CvArr* src, CvArr* dst, int smoothtype, 
                  int size1, int size2, double sigma1, 
                  double sigma2) nogil
                  
    void cvFilter2D(CvArr* src, CvArr* dst, CvMat* kernel,
                    CvPoint anchor) nogil
                    
    void cvIntegral(CvArr* image, CvArr* sum, CvArr* sqsum,
                    CvArr* tilted_sum) nogil
                    
    void cvPyrDown(CvArr* src, CvArr* dst, int filter) nogil
    
    void cvPyrUp(CvArr* src, CvArr* dst, int filter) nogil
    
    CvMat** cvCreatePyramid(CvArr* img, int extra_layers, double rate,
                            CvSize* layer_sizes, CvArr* bufarr, int calc,
                            int filter) nogil
                            
    void cvReleasePyramid(CvMat*** pyramid, int extra_layers) nogil
    
    void cvWatershed(CvArr* image, CvArr* markers) nogil
    
    void cvInpaint(CvArr* src, CvArr* inpaint_mask, CvArr* dst, 
                   double inpaintRange, int flags) nogil
                   
    void cvSobel(CvArr* src, CvArr* dst, int xorder, int yorder,
                 int aperture_size) nogil
                 
    void cvLaplace(CvArr* src, CvArr* dst, int aperture_size) nogil
    
    void cvCvtColor(CvArr* src, CvArr* dst, int code) nogil
    
    void cvResize(CvArr* src, CvArr* dst, int interpolation) nogil
    
    void cvWarpAffine(CvArr* src, CvArr* dst, CvMat* map_matrix,
                      int flags, CvScalar fillval) nogil
                      
    void cvWarpPerspective(CvArr* src, CvArr* dst, CvMat* map_matrix, int flags,
                           CvScalar fillval) nogil
                           
    void cvRemap(CvArr* src, CvArr* dst, CvArr* mapx, CvArr* mapy, int flags,
                 CvScalar fillval) nogil
    
    void cvConvertMaps(CvArr* mapx, CvArr* mapy, CvArr* mapxy, CvArr* mapalpha) nogil
    
    
                 
    #---------- Histogram Function Prototypes ---------------------#
    CvHistogram* cvCreateHist(int dims, int* sizes, int type, float** ranges, int uniform) nogil
    
    void cvSetHistBinRanges(CvHistogram* hist, float** ranges, int uniform) nogil
    
    CvHistogram* cvMakeHistHeaderForArray(int dims, int* sizes, CvHistogram* hist, float* data,
                                          float** ranges, int uniform) nogil
                                          
    void cvReleaseHist(CvHistogram** hist) nogil
    
    void cvClearHist(CvHistogram* hist) nogil
    
    void cvGetMinMaxHistValue(CvHistogram* hist, float* min_value, float* max_value, 
                              int* min_idx, int* max_idx) nogil
                            
    void cvNormalizeHist(CvHistogram* hist, double threshold) nogil
    
    void cvThreshHist(CvHistogram* hist, double threshold) nogil
    
    double cvCompareHist(CvHistogram* hist1, CvHistogram* hist2, int method) nogil
    
    void cvCopyHist(CvHistogram* src, CvHistogram** dst) nogil
    
    void cvCalcBayesianProb(CvHistogram** src, int number, CvHistogram** dst) nogil
    
    void cvCalcArrHist(CvArr** arr, CvHistogram* hist, int accumulate, CvArr* mask) nogil
    
    void cvCalcHist(IplImage** image, CvHistogram* hist, int accumulate, CvArr* mask) nogil
    
    void cvCalcArrBackProject(CvArr** image, CvArr* dst, CvHistogram* hist) nogil
    
    void cvCalcArrBackProjectPatch(CvArr** image, CvArr* dst, CvSize range, 
                                   CvHistogram* hist, int method, double factor) nogil
                                   
    void cvCalcProbDensity(CvHistogram* hist1, CvHistogram* hist2, CvHistogram* dst_hist, double scale) nogil
    
    void cvEqualizeHist(CvArr* src, CvArr* dst) nogil
    
    

    
                    
